import { books } from '../../../utils/mockData.js'
Page({
  data: { book: null },
  onLoad(options) {
    const book = books.find(b => b.id === parseInt(options.id))
    if (book) this.setData({ book })
  },
  purchase() {
    wx.showToast({ title: '功能开发中', icon: 'none' })
  }
})
